
.metadata-properties-header {
	padding: 0 var(--popup-padding) 0.375rem;
	font-size: var(--font-ui-small);
	font-weight: 500;
	color: var(--text-muted);
	user-select: none;
	-webkit-user-select: none;

	display: flex;
	flex-direction: row;
	gap: 2px;
	align-items: center;
	&:hover {
		color: var(--text-normal);
	}
	svg {
		color: var(--text-muted);
		transition: transform 0.1s ease-in-out;
	}
	&.collapsed {
		svg {
			transform: rotate(-90deg);
			transition: transform 0.1s ease-in-out;
		}
	}
}

.metadata-properties {
	--input-height: var(--metadata-input-height);
	padding: var(--popup-properties-padding);
	margin: 0;
	display: flex;
	flex-direction: column;
	flex-shrink: 1;
	gap: var(--metadata-gap);
	max-height: 46%;
	overflow-y: scroll;
	&:empty {
		display: none;
	}
	&.collapsed {
		display: none;
	}
}
.metadata-property {
	display: flex;
	flex-direction: row;
	gap: 2px;
	align-items: center;
	border-radius: var(--radius-s);
	overflow: hidden;
	min-height: var(--input-height);
	transition:
		box-shadow .15s ease-in-out,
		border .15s ease-in-out;
	@media (hover: hover) {
		&:hover {
			box-shadow: 0 0 0 1px var(--background-modifier-border);
		}
	}
	&:focus-within {
		box-shadow: 0 0 0 2px var(--background-modifier-border-focus);
		transition:
			box-shadow .15s ease-in-out,
			border .15s ease-in-out;
	}
	input[type=text] {
		border: none;
		background-color: transparent;
		padding: 0;
		border-radius: 0;
		&:hover,
		&:active,
		&:focus {
			border: none;
			box-shadow: none;
		}
	}
}
.metadata-property-key {
	display: flex;
	align-self: stretch;
	align-items: center;
	flex-direction: row;
	flex-shrink: 0;
	border-bottom: var(--metadata-divider-width) solid var(--metadata-divider-color);
	background-color: var(--metadata-label-background);
	width: var(--metadata-label-width);
	min-width: var(--metadata-label-width);
	height: var(--input-height);

	label {
		padding-inline-start: 0.375rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		font-weight: 400;
		color: var(--text-muted);
		font-size: var(--font-ui-smaller);
		user-select: none;
		-webkit-user-select: none;
		margin: 0;
	}
	@media (hover: hover) {
		&:hover {
			background-color:var(--metadata-label-background-hover);
		}
	}
	&:focus-within {
		background-color:var(--metadata-label-background-active);
	}
}
.metadata-property-icon {
	margin-inline-start: 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: var(--icon-size);
	color: var(--text-muted);
	height: var(--input-height);
	svg {
		width: var(--icon-size);
		height: var(--icon-size);
	}
}
.metadata-property-value {
	display: flex;
	flex: 1 1 auto;
	gap: 0.25rem;
	align-items: center;
	align-self: stretch;
	font-family: var(--metadata-input-font);
	min-height: var(--input-height);
	background-color: var(--metadata-input-background);
	border-bottom: var(--metadata-divider-width) solid var(--metadata-divider-color);
	overflow: hidden;
	padding-inline-start: 0.375rem;
	&:focus-within {
		background-color: var(--metadata-input-background-active);
	}
}